Skip to content

Add support for client assertion access token - #16

Merged
clement911 merged 6 commits into
mainfrom
feat/add-support-for-client-accesstoken
Nov 3, 2026
Merged

clement911 merged 6 commits into
mainfrom
feat/add-support-for-client-accesstoken

Conversation

@matnun-br

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Request-level tests do not cover unsupported curves, unusable PEM keys, or invalid application-only token responses, leaving key validation paths untested.

2 open issues
What changed in this PR

Adds application-only authentication to ShopifyNet using signed ES256 client assertions, alongside the existing OAuth flows.

Changes:

  • Adds fresh client assertion generation, token requests without a client secret, and response validation.
  • Provides P-256 signing-key generation through a library helper and console tool.
  • Adds signing/request tests, an opt-in integration test, and setup documentation.
File Description
ShopifyNet/​OAuth/​ShopifyOAuthClient.cs Implements assertion-based token requests and disables default HTTP redirects.
ShopifyNet/​OAuth/​ShopifyClientAssertionAccessToken.cs Defines the expiring token response with token-safe string output.
ShopifyNet/​OAuth/​ShopifyApplicationOnlyKeys.cs Generates private PEM keys and public JWKs.
ShopifyNet.Tests/​ShopifyClientAssertionIntegrationTests.cs Adds an opt-in live token request test.
ShopifyNet.Tests/​ShopifyClientAssertionAccessTokenRequestTests.cs Verifies request fields, signatures, and fresh assertions.
ShopifyNet.Tests/​ShopifyApplicationOnlyKeyPairTests.cs Tests generated keys and key ID validation.
ShopifyNet.sln Registers the key-generation console project.
ShopifyNet.KeyPairGenerator/​ShopifyNet.KeyGenerator.csproj Configures the console tool and library reference.
ShopifyNet.KeyPairGenerator/​KeyPairGenerator.cs Prints generated private keys and public JWKs.
README.md Documents key generation, token acquisition, and integration testing.

Review effort: Balanced

Comment thread ShopifyNet/OAuth/ShopifyOAuthClient.cs Resolved
Comment thread ShopifyNet/OAuth/ShopifyOAuthClient.cs Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Request tests cover only valid responses, leaving rejection of missing or blank access tokens and missing, zero, or negative expiry values untested.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Base automatically changed from feat/add-support-to-non-expiring-token to main November 3, 2026 00:50
…lgorithms

- Updated README with new key generation instructions.
- Modified ShopifyOAuthClient to support RS256 alongside ES256.
- Enhanced tests to cover both signing algorithms and key validation.
@clement911
clement911 force-pushed the feat/add-support-for-client-accesstoken branch from 5ecc8ca to 1069ccd Compare November 3, 2026 00:50
@clement911
clement911 merged commit 3169ef9 into main Nov 3, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants